package com.yhy.wxzn.wcs.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yhy.wxzn.wcs.device.rgv.enums.RgvProgress;
import com.yhy.wxzn.wcs.enums.RgvTaskAssignStatus;
import com.yhy.wxzn.wcs.enums.TaskStatus;
import com.yhy.wxzn.wcs.enums.TaskType;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.Objects;




@Getter
@Setter
@TableName("wcs_task")
public class WcsTask  {
    @TableId(value = "task_id", type = IdType.AUTO)
    private Integer taskId;

    private String wmsTaskId;

    private TaskType taskType;

    private TaskStatus taskStatus;

    private String start;

    private String end;

    private String barCode;
    //是否分车 0未分配  1已分配
    private RgvTaskAssignStatus assignStatus;
    //处理当前任务的小车设备码
    private Integer processRgvDeviceCode;
    //任务进度
    private RgvProgress rgvProgress;

    private Integer priorityCode;

    private Integer plcId;

    private Integer plcProgress;

    private String portCode;

    private Date createTime;

    private Date startTime;

    private Date completeTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WcsTask task = (WcsTask) o;
        return this.taskId.equals(task.taskId);
    }

    @Override
    public int hashCode() {
        return Objects.hash( taskId);
    }

    @Override
    public String toString() {
        return "WcsTask{" +
                "taskId=" + taskId +
                '}';
    }
}

